
import java.util.*;
class Time{
    int hour,minute,second;
    Time(){
        Calendar c = Calendar.getInstance();
        hour= c.get(Calendar.HOUR_OF_DAY);
        second=c.get(Calendar.MINUTE);
        minute=c.get(Calendar.SECOND);
    }
    Time(int n){
        n=n/1000;
        hour=n%60%60%24;
        second=n%60;
        minute=(n-second)/60%60;
    }
    Time(int a,int b,int c){
        hour=a;
        minute=b;
        second=c;
    }
    public int getHour() {
        return hour;
    }
    public int getMinute() {
        return minute;
    }
    public int getSecond() {
        return second;
    }
    public void setTime(int n) {
        n=n/1000;
        hour=n%60%60%24;
        second=n%60;
        minute=(n-second)/60%60;
    }
}

public class ex45{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Time t1 = new Time();
        Time t2 = new Time(n);

        System.out.println("Hour: " + t2.getHour() + " Minute: " + t2.getMinute() + " Second: " + t2.getSecond());
    }
}

